#ifndef PAGEOPERATION_H
#define PAGEOPERATION_H

#include <QWidget>
#include <QLabel>
#include <QEvent>
#include <QDateTime>
#include <QTimer>
#include "global_def.h"
#include "globalconfig.h"
#include "train.h"
#include "ATC/signalmainpage.h"

namespace Ui {
class PageOperation;
}

class PageOperation : public QWidget
{
    Q_OBJECT

public:
    explicit PageOperation(QWidget *parent = nullptr);
    ~PageOperation();
    Train *train() const;
    SignalMainpage *atc_page() const;
    void activateAlarm(uint id, uint time, QString car, QString description, QString level);
    void setPisMannualBtnsActive(bool xActive);
    void setATCComflt(bool xComflt);
public slots:
    void slotBypassBtnStat(bool xAct);
    void slotTracBlockBtnStat(bool xAct);
    void slotEBTrigBtnStat(bool xAct);
    void slotSpeedLimitBtnStat(bool xAct);
private slots:
     void slot_gotoFirepage();
     void slot_gotoPECUpage();
     void on_Btn_SpdLmtHint_clicked();
     void on_Btn_EBTrig_clicked();
     void on_Btn_Bypass_clicked();
     void on_Btn_SelfTest_clicked();  
     void on_Btn_TracBlock_clicked();
     void on_AckBtn_clicked();
     void on_BtnDepartPA_clicked();
     void on_BtnArrivedPA_clicked();
     void on_Btn_NextStation_clicked();
     void on_Btn_PreStation_clicked();

signals:
     void signal_show_operation_page(int);
     void signal_DepartPA(bool);
     void signal_ArrivedPA(bool);
     void signal_NextStationPA();
     void signal_PreStationPA();
private:
    Ui::PageOperation *ui;
private:
    Train *m_pTrain;
    QList<AlarmInfo> alarmlist;
    SignalMainpage *atc_mainwindow_;
};

#endif // PAGEOPERATION_H
